import {cell,
  CellGroup, CellBlock, createStore, register, store} from 'components/form'
import Button from "components/items/button";


function template(state, props) {
  return (
    <View className='pages-login'>
      <View className='item-header'><Text>系统登录</Text></View>
      <CellGroup data={state.formData} store={store} formClass='form-login' />
      <View className='flex-row justify-between al-item-center mt-default'>
        <View className='flex-column'><Text>账号 : admin 密码 : 随便填</Text><Text>账号 : admin 密码 : 随便填</Text></View>
        <Button title='第三方登录' itemClass='' tap='' />
      </View>    
    </View>
  )
}

export default function(Pager) {
  return Pager({
    template,
    data: {
      formData: [
        {
          required: true,
          itemClass: 'item-group entity-flex',
          input: [
            { id: 'input-1-1', value: {title: ' ', itemClass: 'icon-saui'}, spantype: 'item', type: 'span', itemClass: 'item-flex-no'},
            { id: "input-1", value: "admin", type: "text", error: '请输入姓名'}
          ]
        },
        {
          required: true,
          itemClass: 'item-group entity-flex',
          input: [
            {id: 'input-2-2', value: {title: ' ', itemClass: 'icon-saui'}, spantype: 'item', type: 'span', itemClass: 'item-flex-no'},
            {id: "input-2", value: 'admin', placeholder: "***********", type: "password" , desc: {itemClass: 'icon-arrow_down'}}
          ]
        },
        {
          itemClass: 'entity-flex',
          input: [
            {
              id: 'btn',
              type: 'button',
              value: '登录',
              btnClass: 'flex-1 btn-default'
            }
          ]
        }
      ]
    },
    onReady(){}
  })
}